﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Runtime.Serialization;

namespace PedesTrainProject.Grid
{
    [Serializable()]
    public class Background : ISerializable
    {
        private string name;
        private string skin;
        private bool access;
        private Vector position;

        public Background(string _skin, Vector _position)
        {

        }

        public Background(string _name, string _skin, bool access)
        {

        }

        #region Serialize
        public Background(SerializationInfo info, StreamingContext ctxt)
        {
            this.name = (string)info.GetValue("Name", typeof(string));
            this.skin = (string)info.GetValue("Skin", typeof(string));
            this.access = (bool)info.GetValue("Access", typeof(bool));
            this.position = (Vector)info.GetValue("Position", typeof(Vector));
        }

        public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
        {
            info.AddValue("Name", this.name);
            info.AddValue("Skin", this.skin);
            info.AddValue("Access", this.access);
            info.AddValue("Position", this.position);
        }
        #endregion
    }
}
